---
image: /generated/articles-docs-studio-restart-studio.png
title: restartStudio()
crumb: "@remotion/studio"
---

# restartStudio()<AvailableFrom v="4.0.162"/>

```tsx twoslash title="MyComp.tsx"
import { restartStudio } from "@remotion/studio";
import { useCallback } from "react";

const MyComp: React.FC = () => {
  const onClick = useCallback(async () => {
    try {
      await restartStudio();
      console.log("Studio will restart now");
    } catch (err) {
      console.error(err);
    }
  }, []);

  return (
    <button type="button" onClick={onClick}>
      Hello World
    </button>
  );
};
```

## Requirements

In order to use this function:

<Step>1</Step> You need to be inside the Remotion Studio.
<br />
<Step>2</Step> The Studio must be running (no static deployment)
<br />
<br />

Otherwise, the function will throw.

## See also

- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/studio/src/api/restart-studio.ts)
